#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <time.h>

#define BASE_ID_GIVEN 1
#define INIT 1
#define HANDO 1
#define TERMI -1
#define DEADE -3 //dead end

#define SAMPLENO 100
#define BLOCKSIZE 1024
#define DOUBLEBSIZE BLOCKSIZE*2
#define BASENO 20

typedef struct host_arrays
{
	int *h_baseId, *h_no, *h_etype;
	float *h_time;
	float *h_duration,*h_speed,*h_pos;
	int* h_init;
} ha_t;

typedef struct device_arrays
{
	int *d_index;
	int *d_baseId, *d_no, *d_etype;
	float *d_time;
	float *d_duration,*d_speed,*d_pos;
	int* d_init;
} da_t;

#define timer_start(start, stop) \
	cudaEventCreate(&start);\
	cudaEventCreate(&stop);\
	cudaEventRecord(start, 0);
#define timer_stop(start, stop, elapsedTime) \
	cudaEventRecord(stop, 0);\
	cudaEventSynchronize(stop);\
	cudaEventElapsedTime(&elapsedTime, start, stop);\
	cudaEventDestroy(start);\
	cudaEventDestroy(stop);\
	cout<<elapsedTime<<"ms"<<endl;

using namespace std;
